
$(function() {
	//获取房间的列表
	var noticeheadurl;
	MuiAjaxFn("client/consulting/select?page=1&pagesize=100", {
		'tosort': 'asc',
		'sorting': 'end_send_time'
	}, function(data) {
		if(data.pageInfo.size != 0) {
			var str = '';
			$.each(data.pageInfo.list, function(idx, obj) {
				if(user.getter().openId == obj.fromOpenId){
					str += ' <div class="box" data-roomNumber="' + obj.roomNumber + '">' +
					'<span class="img" style="background:url(' + data.dataResultObj.toInfo.headimgurl + ') "></span>' +
					'<div class="text_left">' +
					'	<p class="name">' + obj.userNickname + '</p>' +
					'	<p class="phide1">' + obj.endSendMessage + '</p>' +
					'</div>' +
					'<div class="text_right">' +
					'	<span>' + getMoth(obj.endSendTime) + '</span>' +
					'</div>' +
					'</div>';
				}
				
			});
			$(".content").html(str);
			$(".box").on("tap", function() {
				window.location.href = 'HelpCenter.html?source=news&roomNumber=' + $(this).attr("data-roomNumber");
			})
			
			if($(".content .box").length == 0 ){
				nodata('暂无消息', '.content', 0)
			}
			
		}else{
			nodata('暂无消息', '.content', 0)
		}
	})
})